package com.chixing.ih.module.programmer.controller;

import com.chixing.ih.json.ResponseData;
import com.chixing.ih.module.programmer.pojo.dto.TechnologyCreditListDTO;
import com.chixing.ih.module.programmer.service.ITechnologyCreditService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @version 1.0
 * @Author MasterYan
 * @Date 2020/10/4
 * Time: 15:54
 */
@RestController
@RequestMapping("/technologyCredit")
@Api(tags = "程序员模块信用积分相关Api")
public class TechnologyCreditController {

    @Autowired
    ITechnologyCreditService technologyCreditService;

    /**
     * desc:查询信用积分接口
     *
     * @param programmerId
     * @return
     */
    @ApiOperation(value = "查询信用积分接口", notes = "查询信用积分")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "programmerId", value = "程序员id", required = true, dataType = "long"),

    })
    @ApiResponses({
            @ApiResponse(code = 200, message = "查询成功"),

    })
    @GetMapping("/technologyCredit/{programmerId}")
    public Map<String, Object> technologyCredit(@PathVariable("programmerId") long programmerId) {
        TechnologyCreditListDTO technologyCredit = technologyCreditService.technologyCredits(programmerId);
        return ResponseData.REP_GET_SUCCESS(technologyCredit);

    }

}
